<!DOCTYPE html>
<html class="no-js" lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>管理员主页</title>
    <script src="//unpkg.com/vue/dist/vue.js"></script>
    <script src="//unpkg.com/element-ui@2.15.6/lib/index.js"></script>
    <style>
        @import url("//unpkg.com/element-ui@2.15.6/lib/theme-chalk/index.css");
        #main {
            position: absolute;
            left: 50%;
            top: 50%;
            text-align: center;
            transform: translate(-50%, -100%);
        }
        h2 {
            color: grey;
        }
    </style>
</head>
<body>
<div id="app">
    <div id="main">
        <h2>管理员主页</h2>
        <br/>
        <el-button type="success" @click="toGoods" plain>商品管理</el-button>
        <el-button type="primary" @click="tomMember" plain>会员信息管理</el-button>
        <el-button type="danger" @click="toCard" plain>会员卡管理</el-button>
        <el-button type="warning" @click="toOrder" plain>会员消费记录</el-button>
        <el-button type="info" @click="logout" plain>退出登录</el-button>
    </div>
</div>
<script>
    var Main = {
        data() {
            return {
                activeName: '1'
            };
        },
        methods: {
            toGoods() {
                window.location = "/admin/goods"
            },
            tomMember() {
                window.location = "/admin/member"
            },
            toCard() {
                window.location = "/admin/card"
            },
            toOrder() {
                window.location = "/admin/order"
            },
            logout() {
                window.location = "/admin/logout"
            }
        }
    };
    var Ctor = Vue.extend(Main);
    new Ctor().$mount('#app')
</script>
</body>
</html>